package com.iteaj.iboot.plugin.crawler.sites;

import cn.hutool.core.util.RandomUtil;

public class SeleniumUtils {

    public static void waitByTimes(int min, int max) {
        waitByTimes(RandomUtil.randomLong(min, max), false);
    }

    public static void waitByTimes(long millis, boolean isThrow) {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException e) {
            if(isThrow) {
                throw new RuntimeException(e);
            }

            e.printStackTrace();
        }
    }
}
